package com.maserb.monitor.service.author_manage;

import com.maserb.monitor.entity.Role;
import com.maserb.monitor.entity.RoleFunction;
import com.maserb.monitor.repository.RoleRepository;
import com.maserb.monitor.service.base.JpaSpecificationService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * 角色service
 * @author jimmy
 */
public interface RoleService extends JpaSpecificationService<RoleRepository, RoleRepository, Role, String> {

    Page<Role> findAll(Pageable pageable, String roleName);

    void saveRole(Role role, String[] functionId);

    List<RoleFunction> findFunctionByRole(Role role);

    void deleteRoleByKeys(List<String> keys);
}